package cn.jinjie.day05.test8;

import java.util.Arrays;

public class Demo11 {
    public static void main(String[] args) {
        // (数据源数组, arr1起始索引, 目的地数组, arr2起始索引, 拷贝个数)
        int[] arr1 = {15, 16, 18, 19, 20};
        int[] arr2 = new int[5];
        System.arraycopy(arr1,1,arr2,1,4);
        String s = Arrays.toString(arr2);
        System.out.println(s);//[0, 16, 18, 19, 20]
    }
}
